home *** CD-ROM | disk | FTP | other *** search
/ Macromedia Multimedia Showcase 5.1 / Macromedia - Multimedia Showcase 5.1 (Macromedia) (1996).ISO / pc / media / shared.dir / 02021_Script_Panning Skyline Script < prev    next >
Text File  |  1996-03-28  |  976b  |  47 lines

  1. -- Uses pictures numbered 0 through 8 to Pan Left/Right accross SF skyline
  2. -- Skyline 0 is the default picture, located in the Pan 0 frame
  3.  
  4. on InitializePan
  5.   -- put #InitializePan
  6.   global gPanIndex
  7.   set gPanIndex = 0
  8.   go frame string("Pan" && gPanIndex)
  9. end InitializePan
  10.  
  11. --
  12.  
  13. on PanLeft  
  14.   global gPanIndex
  15.   if gPanIndex < 8 then
  16.     set gPanIndex = gPanIndex+1    
  17.   else
  18.     set gPanIndex = 0
  19.   end if
  20.   set myLabel = string("Pan" && gPanIndex)
  21.   puppetTransition 12, 0, 64, TRUE
  22.   go frame myLabel
  23.   ResetNavTimeout()
  24. end PanLeft
  25.  
  26. --
  27.  
  28. on PanRight  
  29.   global gPanIndex
  30.   if gPanIndex > 0 then
  31.     set gPanIndex = gPanIndex-1    
  32.   else
  33.     set gPanIndex = 8
  34.   end if
  35.   set myLabel = string("Pan" && gPanIndex)
  36.   puppetTransition 11, 0, 64, TRUE  
  37.   go frame myLabel
  38.   ResetNavTimeout()
  39. end PanRight
  40.  
  41. --
  42.  
  43. on ResetNavTimeout
  44.   global gNavObj
  45.   StartTimeOut(gNavObj)
  46.   set the timingOut of gNavObj = true
  47. end ResetNavTimeout